package com.xiaozhengkeji.starbootserver.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * > ResponseData 是一个类，表示从服务器返回的数据
 */
@Data
@Slf4j
@ApiModel(value = "返回结构体", description = "返回结构体")
public class ResponseData {
    //Http状态码
    @ApiModelProperty(value = "返回结果码")
    private Integer code;
    //返回信息
    @ApiModelProperty(value = "返回结果")
    private String msg;
    //返回的数据
    @ApiModelProperty(value = "返回结构体数据")
    private Object data;
    //返回的数据
    @ApiModelProperty(value = "返回结构体数据 - 副数据")
    private Object data_s;

    public ResponseData(ResponseType code, String msg, Object data, Object dataStandby) {
        this.code = code.getCODE();
        this.msg = msg;
        this.data = data;
        this.data_s = dataStandby;
    }
}
